[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 VARADDR VAR1,VAR2

 Function
  Sets a variable to the complete address (segment and offset) of another
  variable.

 Syntax
  VARADDR src,dest

   src   - The variable to get the address of.
   dest  - The variable to store the address in.

 Remarks
  This statement is primarily useful in conjunction with DOINTR.  It may
  be necessary to give an interrupt the address of a memory location that
  can be used to store information.  This statement will allow you to get
  the address of a specified variable to pass to DOINTR.

 Examples
  ' Create subdirectory - DOS function 39h
  INTEGER addr
  STRING  path
  LET path = "C:\$TMPDIR$"
  VARADDR path,addr
  DOINTR 21h,39h,0,0,addr%10000h,0,0,0,addr/10000h,0
  IF (REGCF() & (REGAX() = 3)) THEN
   PRINTLN "Error:  Path not found"
  ELSE IF (REGCF() & (REGAX() = 5)) THEN
   PRINTLN "Error:  Access Denied"
  ELSE IF (REGCF()) THEN
   PRINTLN "Error:  Unknown Error"
  ELSE
   PRINTLN "Directory successfully created..."
  ENDIF

See Also: MKADDR() VAROFF VARSEG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson